<script>
export default {
  // name: 'ElTable',
  mounted() {
    this.$nextTick(() => {
      let el = this.$el.childNodes[2]
      if(!el || el.scrollWidth === el.clientWidth) return
      let self = this
      el.addEventListener('scroll', function() {
        if(!self.__tablefixedwrappertop) {
          self.__tablefixedwrappertop = self.$el.childNodes[5].childNodes[1].style.top
        }
        if(this.scrollHeight - this.clientHeight === this.scrollTop) {
          self.$el.childNodes[4].childNodes[1].style.top = parseInt(self.__tablefixedwrappertop) - 2 + 'px'
          self.$el.childNodes[5].childNodes[1].style.top = parseInt(self.__tablefixedwrappertop) - 2 + 'px'
        } else {
          self.$el.childNodes[4].childNodes[1].style.top = self.__tablefixedwrappertop
          self.$el.childNodes[5].childNodes[1].style.top = self.__tablefixedwrappertop
        }
      })
    })
  },
  extends: window.ELEMENT.Table
}
</script>

<style lang="scss">

</style>